package com.company;

public class Student {

        private String name;
        public int age;
        public Student(){
            System.out.println("Student()");
        }

        private Student(String name,int age) {
            this.name = name;
            System.out.println("Student(String,name)");
            this.age = age;
        }

        private void eat(){
            System.out.println("i am eat");
        }

        public void sleep(){
            System.out.println("i am pig");
        }

        private void function(String str) {
            System.out.println(str);
        }

        @Override
        public String toString() {
            return "Student{" +
                    "name='" + name + '\'' +
                    ", age=" + age +
                    '}';
        }


}
